Conversation
542422c to
9f2cb59
Compare
|
Hi Rob. Thanks for getting started on this so quickly! Unfortunately, the patch as-is doesn't quite fix the problem, as the alloc crate still gets pulled in unconditionally via lib.rs, meaning compilation for a small example with the #![no_std]
fn main() {
let test = bytesize::KIB;
}
|
|
I guess what I want to know is how much of the library do you need in your no-alloc target? If it's just the data types that makes things simpler. We do run a no-std test on |
d01c082 to
f8b381f
Compare
|
The ensure-no-std project just needs the NoopAllocator removed, at which point it will only compile if the alloc crate is not pulled in by bytesize. I guess adding such an allocator is technically an option for my project, but I don't want to have to manually audit dependencies to ensure that they're not using it. All I would be after for my use case is the data types, conversions, and constants. The parsing and formatting aren't something I need for now, but I agree that it should be possible to have reduced-scope FromStr/Display implementations. I can imagine other people might want it in the future, but it wouldn't be a breaking change to add. |
closes #140